﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGePointOnCurve3d : OdGePointEnt3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGePointOnCurve3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGePointOnCurve3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGePointOnCurve3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGePointOnCurve3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGePointOnCurve3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGePointOnCurve3d() : this(GlobalsPINVOKE.new_OdGePointOnCurve3d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnCurve3d(OdGeCurve3d curve3d) : this(GlobalsPINVOKE.new_OdGePointOnCurve3d__SWIG_1(OdGeCurve3d.getCPtr(curve3d)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnCurve3d(OdGeCurve3d curve3d, double param) : this(GlobalsPINVOKE.new_OdGePointOnCurve3d__SWIG_2(OdGeCurve3d.getCPtr(curve3d), param), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnCurve3d(OdGePointOnCurve3d src) : this(GlobalsPINVOKE.new_OdGePointOnCurve3d__SWIG_3(OdGePointOnCurve3d.getCPtr(src)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnCurve3d Assign(OdGePointOnCurve3d src)
		{
			OdGePointOnCurve3d result = new OdGePointOnCurve3d(GlobalsPINVOKE.OdGePointOnCurve3d_Assign(this.swigCPtr, OdGePointOnCurve3d.getCPtr(src)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurve3d curve()
		{
			OdGeCurve3d result = new OdGeCurve3d(GlobalsPINVOKE.OdGePointOnCurve3d_curve(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double parameter()
		{
			double result = GlobalsPINVOKE.OdGePointOnCurve3d_parameter(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnCurve3d_point__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point(double param)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnCurve3d_point__SWIG_1(this.swigCPtr, param), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point(OdGeCurve3d curve3d, double param)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnCurve3d_point__SWIG_2(this.swigCPtr, OdGeCurve3d.getCPtr(curve3d), param), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d deriv(int order)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnCurve3d_deriv__SWIG_0(this.swigCPtr, order), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d deriv(int order, double param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnCurve3d_deriv__SWIG_1(this.swigCPtr, order, param), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d deriv(int order, OdGeCurve3d curve3d, double param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnCurve3d_deriv__SWIG_2(this.swigCPtr, order, OdGeCurve3d.getCPtr(curve3d), param), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isSingular(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGePointOnCurve3d_isSingular__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isSingular()
		{
			bool result = GlobalsPINVOKE.OdGePointOnCurve3d_isSingular__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool curvature(out double res)
		{
			bool result = GlobalsPINVOKE.OdGePointOnCurve3d_curvature__SWIG_0(this.swigCPtr, out res);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool curvature(double param, out double res)
		{
			bool result = GlobalsPINVOKE.OdGePointOnCurve3d_curvature__SWIG_1(this.swigCPtr, param, out res);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePointOnCurve3d setCurve(OdGeCurve3d curve3d)
		{
			OdGePointOnCurve3d result = new OdGePointOnCurve3d(GlobalsPINVOKE.OdGePointOnCurve3d_setCurve(this.swigCPtr, OdGeCurve3d.getCPtr(curve3d)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePointOnCurve3d setParameter(double param)
		{
			OdGePointOnCurve3d result = new OdGePointOnCurve3d(GlobalsPINVOKE.OdGePointOnCurve3d_setParameter(this.swigCPtr, param), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
